vcAnnotation
vcAnnotation is a layout item used for authoring new and existing annotations in a layout.
See in: Overview
Module: vcCore
Parent: vcLayoutItem
Children -
Referenced by: -
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| Height | Real | RW | Defines the height of text displayed in annotation. |
| LineWidth | Real | RW | Defines the line width of annotation. |
| Location | vcMatrix | RW | Defines the position matrix of annotation in World coordinate system. |
| LockToNode | Boolean | RW | Defines if the annotation is attached to a node in component. That is, whether or not the annotation is anchored to a component or 3D world. |
| Material | vcMaterial | RW | Defines the material of annotation. |
| Node | vcNode | RW | Defines the node the annotation is attached to in the 3D world. If the annotation is not locked to a node, the value is None. |
| Position | vcMatrix | RW | Defines the location of the annotation in its parent's coordinate system.See moreThat is, the anchor point of the annotation. If the annotation is not anchored to a component, the location is based in the World(simulation root node) coordinate system. |
| Text | String | RW | Defines the text of the annotation displayed in an environment. |
Example: Create Annotation
"""Create annotation""" import vcCore as vc app = vc.getApplication() world = vc.getWorld() annotation = world.findLayoutItem('MyAnnotation') if not annotation: annotation = world.createLayoutItem(vc.vcLayoutItemType.ANNOTATION) annotation.Name = 'MyAnnotation' matrix = vc.vcMatrix.new() matrix.P = vc.vcVector.new(500.0, 500.0, 500.0) annotation.Location = matrix matrix.P = vc.vcVector.new(0.0, 0.0, 0.0) annotation.Position = matrix annotation.Material = app.findMaterial('black') annotation.Text = 'My Annotation' annotation.Properties['OutlineStyle'].Value = 0 app.render()